Package-level declarations

Types

Functions

Link copied to clipboard

Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without sound). On success, the sent Message is returned. Bots can currently send animation files of up to 50 MB in size, this limit may be changed in the future.

inline fun animation(block: () -> String): SendAnimationAction
inline fun animation(file: File): <Error class: unknown class>
Link copied to clipboard

Use this method to send audio files, if you want Telegram clients to display them in the music player. Your audio must be in the .MP3 or .M4A format. On success, the sent Message is returned. Bots can currently send audio files of up to 50 MB in size, this limit may be changed in the future. For sending voice messages, use the sendVoice method instead.

inline fun audio(file: InputFile): SendAudioAction
inline fun audio(block: () -> String): SendAudioAction
inline fun audio(file: File): <Error class: unknown class>
Link copied to clipboard

Use this method to send general files. On success, the sent Message is returned. Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future.

inline fun document(block: () -> String): SendDocumentAction
inline fun document(file: File): <Error class: unknown class>
Link copied to clipboard
Link copied to clipboard

Use this method to send photos. On success, the sent Message is returned.

inline fun photo(file: InputFile): SendPhotoAction
inline fun photo(block: () -> String): SendPhotoAction
inline fun photo(file: File): <Error class: unknown class>
Link copied to clipboard
Link copied to clipboard
inline fun sendAudio(block: () -> String): SendAudioAction
Link copied to clipboard
Link copied to clipboard

Use this method to send a group of photos, videos, documents or audios as an album. Documents and audio files can be only grouped in an album with messages of the same type. On success, an array of Messages that were sent is returned.

Link copied to clipboard
inline fun sendPaidMedia(starCount: Int, vararg media: InputPaidMedia): SendPaidMediaAction

inline fun sendPaidMedia(starCount: Int, media: List<InputPaidMedia>): SendPaidMediaAction

Use this method to send paid media. On success, the sent Message is returned.

Link copied to clipboard
inline fun sendPhoto(block: () -> String): SendPhotoAction
Link copied to clipboard
Link copied to clipboard
inline fun sendVideo(block: () -> String): SendVideoAction
Link copied to clipboard
Link copied to clipboard
inline fun sendVoice(block: () -> String): SendVoiceAction
Link copied to clipboard

Use this method to send static .WEBP, animated .TGS, or video .WEBM stickers. On success, the sent Message is returned.

inline fun sticker(block: () -> String): SendStickerAction
inline fun sticker(file: File): <Error class: unknown class>
Link copied to clipboard

Use this method to send video files, Telegram clients support MPEG4 videos (other formats may be sent as Document). On success, the sent Message is returned. Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future.

inline fun video(file: InputFile): SendVideoAction
inline fun video(block: () -> String): SendVideoAction
inline fun video(file: File): <Error class: unknown class>
Link copied to clipboard

As of v.4.0, Telegram clients support rounded square MPEG4 videos of up to 1 minute long. Use this method to send video messages. On success, the sent Message is returned.

inline fun videoNote(block: () -> String): SendVideoNoteAction
inline fun videoNote(file: File): <Error class: unknown class>
Link copied to clipboard

Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message. For this to work, your audio must be in an .OGG file encoded with OPUS, or in .MP3 format, or in .M4A format (other formats may be sent as Audio or Document). On success, the sent Message is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future.

inline fun voice(file: InputFile): SendVoiceAction
inline fun voice(block: () -> String): SendVoiceAction
inline fun voice(file: File): <Error class: unknown class>